<include file="Public:head"/>
<include file="ServiceUser:menu"/>
<link rel="stylesheet" type="text/css" href="{pigcms::Common}/default_user_com.css" media="all">
<div class="content">
          <div class="cLineB">
              <h4 class="left">工号管理</h4>
               
          </div>
          
          <div class="cLine">
    <div class="alert">
    <p><span class="bold">工号管理：</span>添加工号后，在登录的时候填写工号，密码，token即可。登录地址：<a href="/index.php?g=Chat&m=Login&a=index"><?php echo C('site_url');?>/index.php?g=Chat&m=Login&a=index</a></p>
    </div>
</div>
          
          <div class="cLine">
            <div class="pageNavigator left">
                <a href="{pigcms::U('ServiceUser/add',array('token'=>$token))}" class="btnGrayS vm bigbtn">
                    <img src="tpl/User/default/common/images/pic.png" class="vm">添加工号
                </a>
                &nbsp;
                <a href="{pigcms::U('ServiceUser/closeService',array('token'=>$token))}" class="btnGrayS vm bigbtn">
                    <img src="tpl/User/default/common/images/pic.png" class="vm">设置所有客服为离线
                </a>
            </div>
            <div class="clr"></div>
          </div>
          <div class="msgWrap">
          <form method="post" action="" id="info">
          <input name="delall" type="hidden" value="del">
           <input name="wxid" type="hidden" value="gh_423dwjkewad">
            <table class="ListProduct" border="0" cellspacing="0" cellpadding="0" width="100%">
              <thead>
             <tr>                          
				<th class="span3">登录名@token</th>
				<th class="span3">工号</th>
				<th class="span1">在线状态</th>
				<th class="span3">操作</th>
			</tr>
			  </thead>
				<tbody>
					<if condition="$list eq ''">
						<tr>
						<td colspan="6" style="text-align:center; height:30px;"><strong>暂无客服信息.</strong></td>
						</tr>
					<else/>
					<volist name="list" id="list">
						<tr>
						<td>{pigcms:$list['userName']}@{pigcms:$token}</td>
						<td><span class="label"> {pigcms:$list['name']}</span></td>
						<td><if condition="$list['online'] eq 1" ><span style="color:green">在线</span><else/>离线</if></td>
						<td>
							<a href="{pigcms::U('ServiceUser/edit',array('id'=>$list['id'],'token'=>$list['token']))}" class="btn">编辑</a>
							&nbsp;<a href="{pigcms::U('ServiceUser/del',array('id'=>$list['id'],'token'=>$list['token']))}" onclick="return(confirm('确定要删除吗？'))" class="btn">删除</a></a>
						</td>
						</tr>
					</volist>
					</if>
				</tbody>
            </table>
           </form> 
          </div>
          <div class="cLine">
            <div class="pageNavigator right">
                 <div class="pages">{pigcms:$page}</div>
            </div>
            <div class="clr"></div>
          </div>
        </div>  
<include file="Public:footer"/>